Handler's understanding and use 1. Handler's understanding and use
Directory:
Basic knowledge:
1. Android process and thread model
2. Main Android UI thread (or thread security issues)
Knowledge points:
Handler Introduction
Handler Method 1: The
Android Handler and HandlerThread instances
When an application is started, Android starts a main thread (that is, the UI thread) and the main thread distributes events for the UI controls in the management interface. For example, click a Button,
JavaScript event stream, event handler and event object summary, javascript events
Interaction between JS and HTML is implemented through events. An event is a specific interaction moment in a document or browser window. You can use listeners (or
【Abstract]
You may have realized that with HTTP processing programs and modules, ASP. NET has provided powerful energy to developers. Insert your own component into the ASP. NET Request Processing pipeline and enjoy its advantages.
Introduction
Handler
Every beginner Android development is not open handler this "ridge", why it is a ridge, first of all, this is one of the essence of Android architecture, and then most people are aware of it but do not know why. Today, see Handler.post This
Android UI operations are not thread-safe, and only the main thread can operate the UI. At the same time, the main thread has a certain time limit on UI operations (up to 5 seconds ). To perform some time-consuming operations (such as downloading
1. One problem
There is such a problem that deserves our consideration. If we write some functions similar to the download function that is time-consuming and does not necessarily have results) in the Activity (main thread), it will cause Activity
This article includes the following issues related to handler:(1) The role of handler(2) Why is Android designed to update the UI only in the UI thread?(3) Two exceptions to Handler(4) The relationship between Handler and Looper MessageQueue (source
Directory:Basic knowledge:1. Android Process and threading model2. The main thread of the Android UI (or called a threading security issue)Knowledge points involved:Introduction of HandlerHandler usage One: Sub-threading Transaction (background work)
Handler of android
The basic usage and operating principle of handler in android.
Recently, I watched the second quarter of the android reset version of mars's video about handler, which gave me a much better understanding of the components that
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.